<?php

declare(strict_types=1);


namespace app\controller\member;

use app\controller\admin\AdminBaseController;
use app\model\admin\MiniUser;
use app\model\admin\Poster;
use app\Request;
use app\model\admin\SysMember;

use Kkokk\Poster\PosterManager;
use Exception;
use Kkokk\Poster\Exception\Exception as PostException;
use Kkokk\Poster\Facades\Poster as KPoster;

class AgentController extends AdminBaseController
{
    public function getAgentList(Request $request)
    {
        $params = $request->param();
        $user_id = $request->create_by;
        $params['op_id'] = $user_id;
        $list = MiniUser::scope('where', $params)->with(['op'])->where([
            "type" => 1
        ])->order('id', 'desc')->paginate([
            'list_rows' => $this->limit,
            'page' => $this->page,
            'var_page' => $this->pageVar
        ]);
        return successPage($list);
    }
}
